-
Notifications
You must be signed in to change notification settings - Fork 1
Chris Proof of Principle #3
base: master
Are you sure you want to change the base?
Conversation
@ramirezfranciscof I'll leave this up for you to have a look at: https://aiida-blog.readthedocs.io/en/chris-branch/stories/visualising_graphs.html |
from aiida.manage.external import postgres | ||
from aiida.manage.tests import _GLOBAL_TEST_MANAGER, BACKEND_DJANGO | ||
from aiida.common.utils import Capturing | ||
# this is required on READTHEDOCS, since the docker container only contains C.UTF-8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sphuber, quick question, is there a specific reason that _CREATE_DB_COMMAND
is hard-coded to en_US.UTF-8
. As commented, It's the only sticking point I had on getting this to work on RTD.
I'm planning to turn this into a small sphinx-extension,
so would probably want to make a PR to aiida-core, to change this in some way, to avoid this patch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we applied this to have some consistency for the databases that are created by AiiDA, but I was not very close involved in that decision. This was mostly done between @giovannipizzi and @szoupanos if I remember correctly. If I understand correctly, you would apply the same change in aiida-core
? Instead of hard coding utf-8 as encoding, use whatever is set by os.enivron['LANG']
. I am not sure what the consequences of this would be.
What is the exact reason why having utf-8 fails for your use case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand correctly, you would apply the same change in aiida-core?
No probably just something like os.environ.get("AIIDA_DB_ENCODING", "en_US.UTF-8")
, so nothing would change unless specified.
What is the exact reason why having utf-8 fails for your use case?
The RTD docker container does not set up en_US.UTF-8
or install locale
. So I don't think there is any way to add it at run time.
https://github.com/readthedocs/readthedocs-docker-images/blob/master/Dockerfile
No description provided.